#pragma once

#include "protocol/udpsocket.h"

class UDPClient {
public:
    UDPClient(std::string server_ipv4, uint16_t server_port) {
        _udpSocket = std::make_shared<UDPSocket<2000>>(true);
        _udpSocket->Connect(server_ipv4, server_port);
    }

    std::shared_ptr<UDPSocket<2000>> get_udp_obj() {return _udpSocket;}

    void UDPClientSend(std::string msg) {
        _udpSocket->Send(msg);
    }

private:
    std::shared_ptr<UDPSocket<2000>> _udpSocket;
};